home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 6
/
CU Amiga Magazine's Super CD-ROM 06 (1996)(EMAP Images)(GB)(Track 1 of 4)[!][issue 1997-01].iso
/
cucd
/
readers
/
utils
/
gui4cli
/
demos
/
ppshow.gc
< prev
next >
Wrap
Text File
|
1996-10-28
|
6KB
|
185 lines
G4C
; This is a file which is supposed to be loaded and used by the MMedia.gc
; file, but can just as easily be run on its own.
; Its a GUI for the excellent and free Graphics and ANIM player PPShow 4
; (it also works with older versions of ppshow)
WINBIG -1 30 340 132 "PPShow 4.0 GUI"
wintype 11110001 ; a resizable window
WinSmall 0 -1 -1 -1
;============================> Some Graphics (to fill in space)
LINE 90 53 330 53 1
LINE 90 54 330 54 2
LINE 90 76 330 76 1
LINE 90 77 330 77 2
;============================> AppWindow
xAPPWINDOW ppsfile ; We hereby make the window an AppWindow
if $ppsfile > "" ; All files dropped into it will go in ppsfile
update ppshow.gc 1 $ppsfile ; We update the TEXT gadget with the file name
update MMedia.gc 1 $ppsfile ; We also update the TEXT gadget in the MMedia.gc
gosub ppshow.gc play ; See routine at the end of the file.
endif
;--------------> Upon Loading, we check if MMedia.gc is loaded or not.
; If loaded, we update our filename, Jifs and Times gadgets as they may have
; been changed from MMedia.gc. - Otherwise, we set the default values of our
; variables.
xONLOAD
SetGad ppshow.gc 10 OFF ; Starting state of our TIME slider
IfExists GUI MMedia.gc
update ppshow.gc 1 $ppsfile
update ppshow.gc 11 $ppstimes
update ppshow.gc 15 $ppsjifs
else
setvar ppsjifs 3 ; Jiffs (speed) - less is faster
setvar ppsJifGad "J=3" ; Command line option for jifs
setvar ppstimes 100 ; Times to play animation
setvar ppsTimesGad "T=100" ; command line option for times to play
setvar ppstime 60 ; Time to play each picture
setvar ppsTimeGad "" ; Command line option for Time - (OFF)
setvar ppslace NL ; Lace / NoLace
setvar ppsmouse NOMOUSE ; Mouse / NoMouse
setvar ppsfile "" ; File(s) to play for ppshow
endif
;===> On Opening the window we refresh the gadgets which may have changed
; while the window was closed.
xONOPEN
if $ppsfile > ""
update ppshow.gc 1 $ppsfile ; TEXT gadget with file name
else
update ppshow.gc 1 "No file chosen"
endif
update ppshow.gc 11 $ppstimes ; Times slider
update ppshow.gc 15 $ppsjifs ; Jifs (speed) slider
;====================> Declare a cycler, to let the user
; choose the type of monitor.
xCYCLER 205 5 121 12 "" ppsmode
CSTR PAL PAL
CSTR A2024 A2024
CSTR 15Hz 15Hz
CSTR NTSC NTSC
CSTR VGA VGA
CSTR SUPER72 SUPER72
;Note that we set the PAL first. That's because I use PAL, and want it
;as default - change it around if you want otherwise.
;===================> An other cycler for the Resolution Modes
xCYCLER 60 5 125 12 Res. ppsres
CSTR Default " "
CSTR LOW LO
CSTR HIGH HI
CSTR "Super HIGH" SHI
CSTR Productive PROD
CSTR HAM HAM
;===================> Cycler for Loop/Repeat/Single play of anims
xCYCLER 205 20 121 12 "" ppsplay
CSTR SINGLE " "
CSTR LOOP LOOP
CSTR REPEAT R
;====================> Declare some checkbox button for lace, mouse, oscn etc
xCHECKBOX 60 20 26 11 Lace ppslace L NL OFF
xCHECKBOX 140 20 26 11 NoFlk ppsflik NF " " OFF
xCHECKBOX 60 35 26 11 DTyp ppsdatt DT " " OFF
xCHECKBOX 140 35 26 11 Mouse ppsmouse " " NOMOUSE OFF
xCHECKBOX 220 35 26 11 Oscn ppsoscn MO NO OFF
xCHECKBOX 300 35 26 11 Cycle ppscycle CYCLE " " OFF
;----> Checkbox for Animation ON/OFF (also turns the jifs slider ON/OFF)
xCHECKBOX 300 60 26 11 "" ppsnoan "" NOANIM ON
if $ppsnoan = ""
SetGad ppshow.gc 15 ON
SetGad MMedia.gc 22 ON
SetVar ppsJifGad "J= $ppsjifs"
else
SetGad ppshow.gc 15 OFF
SetGad MMedia.gc 22 OFF
SetVar ppsJifGad ""
endif
;=========================== ICON - Press to Play
xICON 17 55 GUIs:info/Play
gosub ppshow.gc play
;=================== Sliders for speed time & times to play ============
;----> Slider for speed
xHSLIDER 130 60 170 11 "" ppsjifs 0 10 3 "%2ldJfs"
GadID 15
GadTitle RIGHT
update MMedia.gc 22 $ppsjifs
SetVar ppsJifGad "J= $ppsjifs"
;-----> Slider for Time with checkbox to turn it on or off
xHSLIDER 40 100 210 11 "" ppstime 1 999 60 "%3ld Sec."
GadID 10
setvar ppsTimeGad "TIME= $ppstime"
xCHECKBOX 10 100 26 11 "" ppsTimeGad "TIME= $ppstime" "" OFF
if $ppsTimeGad = ""
SetGad ppshow.gc 10 OFF ; Set slider on/off as per value of checkbox
else
SetGad ppshow.gc 10 ON
endif
;-----> Slider for Times to play with checkbox to turn it on or off
xHSLIDER 40 113 210 11 "" ppstimes 1 999 100 "%3ld Times"
GadID 11
setvar ppsTimesGad "T= $ppstimes"
Update MMedia.gc 21 $ppstimes
xCHECKBOX 10 113 26 11 "" ppsTimesGad "T= $ppstimes" "" ON
if $ppsTimesGad = ""
SetGad ppshow.gc 11 OFF
SetGad MMedia.gc 21 OFF
else
SetGad ppshow.gc 11 ON
SetGad MMedia.gc 21 ON
endif
;================= File request for PPShow ============================
xBUTTON 10 83 20 12 "R"
REQFILE -1 -1 300 -40 "Choose Graphics" MULTI ppsfile sys:
update ppshow.gc 1 $ppsfile
update MMedia.gc 1 $ppsfile
gosub ppshow.gc play
;==========> This is the routine that plays the file(s)
xROUTINE play
if $ppsfile = "" ;If no file was chosen
update ppshow.gc 1 "No file chosen" ;tell the user
update MMedia.gc 1 "No file chosen"
else
RUN 'ppshow >NIL: $ppsfile $ppsJifGad $ppsTimeGad $ppsTimesGad $ppsmode $ppsres $ppsplay $ppslace $ppsflik $ppsdatt $ppsmouse $ppsoscn $ppscycle $ppsnoan'
endif
;========== TEXT box - contains file name
TEXT 35 83 293 12 "No file chosen" 80 BOX
GADID 1
GADTXT RIGHT